// xv6:
#define O_RDONLY_XV6  0x000
#define O_WRONLY_XV6  0x001
#define O_RDWR_XV6    0x002
#define O_CREATE_XV6  0x200
#define O_TRUNC_XV6   0x400

// Linux
#define O_ACCMODE	00000003
#define O_RDONLY	00000000
#define O_WRONLY	00000001
#define O_RDWR		00000002
#define O_TRUNC		00001000	/* not fcntl */
#define O_CREAT		00000100
#define O_DIRECTORY	00200000
#define O_APPEND	00002000


#define F_DUPFD		0	/* dup */
#define F_GETFD		1	/* get close_on_exec */
#define F_SETFD		2	/* set/clear close_on_exec */
#define F_GETFL		3	/* get file->f_flags */
#define F_SETFL		4	/* set file->f_flags */

#define F_LINUX_SPECIFIC_BASE	1024

#define F_DUPFD_CLOEXEC	(F_LINUX_SPECIFIC_BASE + 6)
